module.exports = function (app, mongoose) {
  app.post("/statistics", function (req, res) {
    console.log(req.body)
    // var time = {
    //   $gte: req.query.$gte,
    //   $lt: req.query.$lt,
    // }
    var Patient = mongoose.model("Patient");
    Patient.find({
      createTime: req.body
    }, function (err, docs) {
      if (err) {
        console.log("err:", err);
        res.json({
          state: 1,
          msg: "数据库错误"
        });
        return
      } else {
        res.json({
          status: 0,
          data: docs,
          msg: '查询成功'
        })
        return
      }
    })
  })
}
